Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct plugin logs through vault's logger #3142

Merged
merged 2 commits into from
Aug 15, 2017
Merged

Direct plugin logs through vault's logger #3142

merged 2 commits into from
Aug 15, 2017

Conversation

calvn
Copy link
Contributor

@calvn calvn commented Aug 10, 2017

Plugin logs now go through core's logger.

...
2017/08/10 17:20:10.348312 [INFO ] core: post-unseal setup complete
2017/08/10 17:20:14.839109 [DEBUG] plugin: starting plugin: path=/Users/cleung/code/tmp/vault_plugins/mock-plugin args=[/Users/cleung/code/tmp/vault_plugins/mock-plugin]
2017/08/10 17:20:14.841726 [DEBUG] plugin: waiting for RPC address: path=/Users/cleung/code/tmp/vault_plugins/mock-plugin
2017/08/10 17:20:14.888501 [DEBUG] plugin.mock-plugin: plugin address: address=/var/folders/1x/c_x5s2h90mzdyx4bzz3_dsx80000gn/T/plugin748882765 network=unix
2017/08/10 17:20:14.987489 [INFO ] core: successful mount: path=mock/ type=plugin
^C==> Vault shutdown triggered
2017/08/10 17:20:19.602519 [DEBUG] core: marked as sealed
2017/08/10 17:20:19.602589 [TRACE] core: clearing forwarding clients
2017/08/10 17:20:19.602610 [TRACE] core: done clearing forwarding clients
2017/08/10 17:20:19.602627 [INFO ] core: pre-seal teardown starting
2017/08/10 17:20:19.602643 [INFO ] core: cluster listeners not running
2017/08/10 17:20:19.602679 [INFO ] rollback: stopping rollback manager
2017/08/10 17:20:19.604545 [DEBUG] plugin.mock-plugin: plugin received interrupt signal, ignoring: count=1
2017/08/10 17:20:19.608004 [DEBUG] plugin: plugin process exited: path=/Users/cleung/code/tmp/vault_plugins/mock-plugin
2017/08/10 17:20:19.608212 [INFO ] core: pre-seal teardown complete
2017/08/10 17:20:19.608254 [DEBUG] core: sealing barrier
2017/08/10 17:20:19.608275 [INFO ] core: vault is sealed

@jefferai jefferai added this to the 0.8.1 milestone Aug 11, 2017
}

func (f *hclogFaker) With(args ...interface{}) hclog.Logger {
var nf = *f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this actually necessary? The pointer access should be transparent I thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with this since hclog was doing the same, unless it applies differently in that case: https://github.com/hashicorp/go-hclog/blob/master/int.go#L346

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure it's unnecessary there too. But it doesn't matter either way, really.

@calvn calvn merged commit e0c84d0 into master Aug 15, 2017
@calvn calvn deleted the plugin-logger branch August 15, 2017 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants